﻿using Microsoft.AspNetCore.Builder;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Niti.OrderManage.Domain.Configurations;
using System;
using System.IO;

namespace Niti.OrderManage.Web
{
    public class Startup
    {

        public void ConfigureServices(IServiceCollection services)
        {
            services.AddApplication<NitiOrderManageWebModule>();
            services.AddDbContext<NitiOrderManageDbContext>(options => options.UseLoggerFactory(NitiOrderManageDbContext.DebugLoggerFactory).UseMySql(AppSettings.ConnectionStrings, new MySqlServerVersion(new Version(8, 0, 11))));
            
        }


        public void Configure(IApplicationBuilder app)
        {
            app.InitializeApplication();
        }
    }
}
